/*
* 命名空间: Authority.Model
*
* 功 能： SysRole实体类
*
* 类 名： SysRoleEntity
*
* Version   变更日期            负责人     变更内容
* ─────────────────────────────────────────────────
* V1.0.1    2019/09/27 14:26:13 罗维     创建
*
* Copyright (c) 2019 Lir Corporation. All rights reserved.
*/

namespace Authority.Model
{
    using System;
    using Tool.Model;

    /// <summary>
    /// 系统角色表
    /// </summary>
    [Serializable]
    [DBTableInfo(TableName = "SysRole")]
    public class SysRoleEntity
    {

        /// <summary>
        /// 唯一编码
        /// </summary>
        [DBFieldInfo(ByteLength = 32,DataLength = 32,DecimalDigits = 0,ColumnName = "gCode",Required = true,DefaultValue = "",IsPrimarykey = true)]
        public string gCode
        {
            get; set;
        }

        /// <summary>
        /// 组织机构编码
        /// </summary>
        [DBFieldInfo(ByteLength = 8, DataLength = 20, DecimalDigits = 0, ColumnName = "iOrganizationCode", Required = true, DefaultValue = "", IsPrimarykey = false)]
        public long iOrganizationCode
        {
            get; set;
        }

        /// <summary>
        /// 父节点唯一编码
        /// </summary>
        [DBFieldInfo(ByteLength = 32,DataLength = 32,DecimalDigits = 0,ColumnName = "gParentCode",Required = false,DefaultValue = "",IsPrimarykey = false)]
        public string gParentCode
        {
            get; set;
        }

        /// <summary>
        /// 角色名称
        /// </summary>
        [DBFieldInfo(ByteLength = 50,DataLength = 25,DecimalDigits = 0,ColumnName = "sName",Required = true,DefaultValue = "",IsPrimarykey = false)]
        public string sName
        {
            get; set;
        }

        /// <summary>
        /// 排序
        /// </summary>
        [DBFieldInfo(ByteLength = 8,DataLength = 53,DecimalDigits = 0,ColumnName = "iSort",Required = true,DefaultValue = "((0))",IsPrimarykey = false)]
        public double iSort
        {
            get; set;
        }

        /// <summary>
        /// 创建时间
        /// </summary>
        [DBFieldInfo(ByteLength = 8,DataLength = 23,DecimalDigits = 3,ColumnName = "dCreateTime",Required = false,DefaultValue = "(getdate())",IsPrimarykey = false)]
        public DateTime? dCreateTime
        {
            get; set;
        }

        /// <summary>
        /// 备注
        /// </summary>
        [DBFieldInfo(ByteLength = 400,DataLength = 200,DecimalDigits = 0,ColumnName = "sContent",Required = false,DefaultValue = "",IsPrimarykey = false)]
        public string sContent
        {
            get; set;
        }

        /// <summary>
        /// 是否是超级管理员角色
        /// </summary>
        [DBFieldInfo(ByteLength = 1, DataLength = 1, DecimalDigits = 0, ColumnName = "bIsSuperAdmin", Required = false, DefaultValue = "((0))", IsPrimarykey = false)]
        public bool? bIsSuperAdmin
        {
            get; set;
        }


        /// <summary>
        /// 逻辑删除
        /// </summary>
        [DBFieldInfo(ByteLength = 1,DataLength = 1,DecimalDigits = 0,ColumnName = "bIsDeleted",Required = true,DefaultValue = "((0))",IsPrimarykey = false)]
        public bool bIsDeleted
        {
            get; set;
        }

        /// <summary>
        ///角色类型 0平台控制 1公司控制
        /// </summary>
        [DBFieldInfo(ByteLength = 4, DataLength = 10, DecimalDigits = 0, ColumnName = "iType", Required = true, DefaultValue = "((0))", IsPrimarykey = false)]
        public int iType
        {
            get; set;
        }
    }
}
